#!/bin/bash
vim /etc/profile

export JAVA_HOME=/var/opt/jdk1.8.0_121
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export FFMPEG_HOME=/var/opt/ffmpeg



export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$FFMPEG_HOME/bin:$PATH




echo "export JAVA_HOME=/var/opt/jdk1.8.0_121" > /etc/profile.d/java.sh
echo "export JRE_HOME=$JAVA_HOME/jre" >> /etc/profile.d/java.sh
echo "export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH" >> /etc/profile.d/java.sh
echo "export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH" >> /etc/profile.d/java.sh
source /etc/profile


echo "export FFMPEG_HOME=/var/opt/ffmpeg" > /etc/profile.d/ffmpeg.sh
echo "" >> /etc/profile.d/ffmpeg.sh

export PATH=$PATH:$FFMPEG_HOME/bin
